package com.gisocn.onemap.greendao;

import android.database.Cursor;
import android.database.sqlite.SQLiteStatement;
import com.gisocn.onemap.model.Folders;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.Property;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.database.DatabaseStatement;
import org.greenrobot.greendao.internal.DaoConfig;

/* loaded from: classes.dex */
public class FoldersDao extends AbstractDao<Folders, Long> {
    public static final String TABLENAME = "FOLDERS";

    /* loaded from: classes.dex */
    public static class Properties {
        public static final Property Id = new Property(0, Long.TYPE, "id", true, "_id");
        public static final Property CNUM = new Property(1, String.class, "CNUM", false, "CNUM");
        public static final Property DIR_ID = new Property(2, String.class, "DIR_ID", false, "DIR__ID");
        public static final Property REMARK = new Property(3, String.class, "REMARK", false, "REMARK");
        public static final Property SINDEX = new Property(4, Integer.TYPE, "SINDEX", false, "SINDEX");
        public static final Property ISCOLLECT = new Property(5, Boolean.TYPE, "ISCOLLECT", false, "ISCOLLECT");
    }

    /* JADX INFO: Access modifiers changed from: protected */
    @Override // org.greenrobot.greendao.AbstractDao
    public final boolean isEntityUpdateable() {
        return true;
    }

    public FoldersDao(DaoConfig daoConfig) {
        super(daoConfig);
    }

    public FoldersDao(DaoConfig daoConfig, DaoSession daoSession) {
        super(daoConfig, daoSession);
    }

    public static void createTable(Database database, boolean z) {
        String str = z ? "IF NOT EXISTS " : "";
        database.execSQL("CREATE TABLE " + str + "\"FOLDERS\" (\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL ,\"CNUM\" TEXT,\"DIR__ID\" TEXT,\"REMARK\" TEXT,\"SINDEX\" INTEGER NOT NULL ,\"ISCOLLECT\" INTEGER NOT NULL );");
    }

    public static void dropTable(Database database, boolean z) {
        StringBuilder sb = new StringBuilder();
        sb.append("DROP TABLE ");
        sb.append(z ? "IF EXISTS " : "");
        sb.append("\"FOLDERS\"");
        database.execSQL(sb.toString());
    }

    /* JADX INFO: Access modifiers changed from: protected */
    @Override // org.greenrobot.greendao.AbstractDao
    public final void bindValues(DatabaseStatement databaseStatement, Folders folders) {
        databaseStatement.clearBindings();
        databaseStatement.bindLong(1, folders.getId());
        String cnum = folders.getCNUM();
        if (cnum != null) {
            databaseStatement.bindString(2, cnum);
        }
        String dir_id = folders.getDIR_ID();
        if (dir_id != null) {
            databaseStatement.bindString(3, dir_id);
        }
        String remark = folders.getREMARK();
        if (remark != null) {
            databaseStatement.bindString(4, remark);
        }
        databaseStatement.bindLong(5, folders.getSINDEX());
        databaseStatement.bindLong(6, folders.getISCOLLECT() ? 1L : 0L);
    }

    /* JADX INFO: Access modifiers changed from: protected */
    @Override // org.greenrobot.greendao.AbstractDao
    public final void bindValues(SQLiteStatement sQLiteStatement, Folders folders) {
        sQLiteStatement.clearBindings();
        sQLiteStatement.bindLong(1, folders.getId());
        String cnum = folders.getCNUM();
        if (cnum != null) {
            sQLiteStatement.bindString(2, cnum);
        }
        String dir_id = folders.getDIR_ID();
        if (dir_id != null) {
            sQLiteStatement.bindString(3, dir_id);
        }
        String remark = folders.getREMARK();
        if (remark != null) {
            sQLiteStatement.bindString(4, remark);
        }
        sQLiteStatement.bindLong(5, folders.getSINDEX());
        sQLiteStatement.bindLong(6, folders.getISCOLLECT() ? 1L : 0L);
    }

    /* JADX WARN: Can't rename method to resolve collision */
    @Override // org.greenrobot.greendao.AbstractDao
    public Long readKey(Cursor cursor, int i) {
        return Long.valueOf(cursor.getLong(i + 0));
    }

    /* JADX WARN: Can't rename method to resolve collision */
    @Override // org.greenrobot.greendao.AbstractDao
    public Folders readEntity(Cursor cursor, int i) {
        long j = cursor.getLong(i + 0);
        int i2 = i + 1;
        String string = cursor.isNull(i2) ? null : cursor.getString(i2);
        int i3 = i + 2;
        String string2 = cursor.isNull(i3) ? null : cursor.getString(i3);
        int i4 = i + 3;
        return new Folders(j, string, string2, cursor.isNull(i4) ? null : cursor.getString(i4), cursor.getInt(i + 4), cursor.getShort(i + 5) != 0);
    }

    @Override // org.greenrobot.greendao.AbstractDao
    public void readEntity(Cursor cursor, Folders folders, int i) {
        folders.setId(cursor.getLong(i + 0));
        int i2 = i + 1;
        folders.setCNUM(cursor.isNull(i2) ? null : cursor.getString(i2));
        int i3 = i + 2;
        folders.setDIR_ID(cursor.isNull(i3) ? null : cursor.getString(i3));
        int i4 = i + 3;
        folders.setREMARK(cursor.isNull(i4) ? null : cursor.getString(i4));
        folders.setSINDEX(cursor.getInt(i + 4));
        folders.setISCOLLECT(cursor.getShort(i + 5) != 0);
    }

    /* JADX INFO: Access modifiers changed from: protected */
    @Override // org.greenrobot.greendao.AbstractDao
    public final Long updateKeyAfterInsert(Folders folders, long j) {
        folders.setId(j);
        return Long.valueOf(j);
    }

    @Override // org.greenrobot.greendao.AbstractDao
    public Long getKey(Folders folders) {
        if (folders != null) {
            return Long.valueOf(folders.getId());
        }
        return null;
    }

    @Override // org.greenrobot.greendao.AbstractDao
    public boolean hasKey(Folders folders) {
        throw new UnsupportedOperationException("Unsupported for entities with a non-null key");
    }
}
